/*=============================================================================

  UI MANAGER MODULE

  FILE: UImgr.h
  
  DESCRIPTION

    Manager Module Definition

  EXTERNALIZED FUNCTIONS

    
  Copyright (c) DaeSung Engineering Inc. All rights reserved.

=============================================================================*/
/*=============================================================================

                             EDIT HISTORY

  ---------  -------  -------------------------------------------------------
    when       who     what, where, why
  ---------  -------  -------------------------------------------------------
   06/28/03   nso4th   Version 0.1

=============================================================================*/

#ifndef _UIMGR_H_
#define _UIMGR_H_

/*=============================================================================
  HEADER INCLUSION
=============================================================================*/
#include <Cust_AppDef.h>

/*=============================================================================
  UImgr CLASS DEFINITION
=============================================================================*/
class UImgr : public mgrBase
{
public:
	UImgr();
	~UImgr();

public:
	virtual boolean Init(void);
	virtual boolean Close(void);

/*---------------------------------------------------------
  UI REQUEST FUNCTION
---------------------------------------------------------*/
	void REQ_appInit(void);
	void REQ_appClose(void);
	void REQ_UIEvent(dword event, dword wp, dword lp);
	
/*---------------------------------------------------------
  STATE FUNCTION
---------------------------------------------------------*/
protected:
	virtual void STATE_SYNC(mcxt pTask);
	virtual void STATE_POLLING(void);
	
/*---------------------------------------------------------
  MONITORING
---------------------------------------------------------*/
public:
	void MON_LOCK(boolean lock);

protected:
	void MON_STATE(void);
	void MON_DEVICE(void);
	void MON_MOTION(void);

	void MON_devStatus(GLed *gl, byte sts);

protected:
	void MON_Alloc(void);
	void MON_Free(void);
	
	mcxt	m_monSync;
	boolean	m_reqWait, m_reqLock, m_monLock;
	int32	m_monCnt;
	boolean	m_curSel, m_preSel;
	
/*---------------------------------------------------------
  INTERNAL USAGE
---------------------------------------------------------*/
protected:

/*---------------------------------------------------------
  EVENT HANDLER
---------------------------------------------------------*/
public:
	virtual dword Event_Handler(dword dwType, dword dwEvent, dword wParam, dword lParam);
	dword Event_PreProc(dword dwType, dword dwEvent, dword wParam, dword lParam);

protected:
	void Command_Handler(dword cmd, dword wp, dword lp);
};


#endif /* _UIMGR_H_ */


/*=============================================================================
  EXTERNALIZED FUNCTION DESCRPTIONS
=============================================================================*/
/*--- END OF UImgr.H ---*/
